﻿/**
 *project:com.alipay.utilAlipayTradeStateEnum.java for 2ONE_EFZK
 *author:zsoft     work time:Sep 6, 20072:50:44 PM
 *type:AlipayTradeStateEnum   email:zhanghui.com@gmail.com
 */
package com.wsj.common.paymoney.util;

/**
 * 
 * 
 * AlipayTradeStateEnum
 * TODO
 * WAIT_BUYER_PAY 等待买家付款 X
   WAIT_SELLER_CONFIRM_TRADE  交易已创建，等待卖家确认Y
   WAIT_SYS_CONFIRM_PAY  确认买家付款中，暂勿发货 X
   WAIT_SELLER_SEND_GOODS 支付宝收到买家付款，请卖家发货Y
   WAIT_BUYER_CONFIRM_GOODS 卖家已发货，买家确认中Y
   WAIT_SYS_PAY_SELLER 买家确认收到货，等待支付宝打款给卖家X
   TRADE_FINISHED 交易成功结束Y
 */


public class AlipayTradeStateEnum {
  private int val = 0; 
  public static final int WAIT_BUYER_PAY = 1; 
  public static final int WAIT_SELLER_CONFIRM_TRADE = 2; 
  public static final int WAIT_SYS_CONFIRM_PAY = 3;
  public static final int WAIT_SELLER_SEND_GOODS = 4; 
  public static final int WAIT_BUYER_CONFIRM_GOODS = 5; 
  public static final int WAIT_SYS_PAY_SELLER = 6;
  public static final int TRADE_FINISHED = 7;
  public AlipayTradeStateEnum(){
	  
	  
  }
  public AlipayTradeStateEnum(String str){ 
      if(str.equals("WAIT_BUYER_PAY")){ 
	  val = WAIT_BUYER_PAY;    } 
      if(str.equals("WAIT_SELLER_CONFIRM_TRADE")){  
	  val = WAIT_SELLER_CONFIRM_TRADE;    }  
      if(str.equals("WAIT_SYS_CONFIRM_PAY")){  
	  val = WAIT_SYS_CONFIRM_PAY;    }  
      if(str.equals("WAIT_SELLER_SEND_GOODS")){  
	  val = WAIT_SELLER_SEND_GOODS;    } 
      if(str.equals("WAIT_BUYER_CONFIRM_GOODS")){  
	  val = WAIT_BUYER_CONFIRM_GOODS;    } 
      if(str.equals("WAIT_SYS_PAY_SELLER")){  
	  val = WAIT_SYS_PAY_SELLER;    } 
      if(str.equals("TRADE_FINISHED")){  
	  val = TRADE_FINISHED;    } 
      }
  public int getVal(){  
      return val;  }
}
